<?php

namespace App\Winged\Commands;

use Illuminate\Console\Command;

class InstallCommand extends Command
{
    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = 'winged:install';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Install the winged admin console and initialize the database';

    /**
     * Install directory.
     *
     * @var string
     */
    protected $directory = '';

    /**
     * Execute the console command.
     *
     * @return void
     */
    public function fire()
    {
				$this->installDependency();

        $this->publishDatabase();
    }

		/**
		 * Call dependency installation
		 */
		public function installDependency()
		{
			$this->call('admin:install');
		}

    /**
     * Create tables and seed it.
     *
     * @return void
     */
    public function publishDatabase()
    {
				$this->call('migrate');
				$this->call('db:seed');
    }
}
